<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>打印机</title>
	<link rel="stylesheet" href="../css/common2.css">
</head>

<body>
	<div style="margin-top: 30px;"></div>
	<div id="vue-root">
		<div class="add"><a href="finance_printer_item.html" style="color: white">添加打印机</a></div>

		<div class="table">
			<table class="table_top">
				<thead>
					<tr>
						<th class="one">
							<input type="checkbox" class="check-box" v-model="all">序号
						</th>
						<th>名称</th>
						<th>机器码</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody id="list">
					<tr v-for="(printer,index) in list" :key="printer.id">
						<td class="one">
							<input type="checkbox" class="check-box" v-model="printer.checked">
							<span v-text="index+1"></span>
						</td>
						<td v-text="printer.name"></td>
						<td v-text="printer.code"></td>
						<td>
							<div class="option">
								<a :href="'finance_printer_item.html?id='+printer.id">
									<div class="edit-icon option-icon" style="position: absolute; left: 20%; top: 30%;">
										<img class="img" src="../image/edit.png" height="20" width="20"
											onmouseover="this.src='../image/edit_light.png'"
											onmouseout="this.src='../image/edit.png'" />
									</div>
								</a>
								<div class="delete-icon option-icon" @click="del([printer.id])"
									style="right: 20%; top:30%;position: absolute;">
									<img class="img" src="../image/delete.png" height="20" width="20"
										onmouseover="this.src='../image/delete_light.png'"
										onmouseout="this.src='../image/delete.png'" />
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
		<br>
		<div class="delete" @click="batchDelete" v-if="total>1">批量删除</div>
		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
		</ul>

	</div>
	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>

	<script src="/scriptZIP/dayjs.min.js"></script>

	<script src="/scriptZIP/dayjs.min.js"></script>


	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>

	<script>

		var schoolId = top_params().id;

		var app = new Vue(merge({
			data: {
				urls: {
					del: '/pc/printer/del',
					list: '/pc/printer/list/' + schoolId
				}
			},
			methods: {

			}
		}));
	</script>
</body>

</html>